﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model.EF;
using Model;
using System.Data.Objects;

public partial class System_Contrls_HeaderControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MenusBind();
    }
    void MenusBind()
    {
        IRepository<SystemMenu> MenuRepository = new EntityRepository<SystemMenu>();

        string queryString = "SELECT * FROM SystemMenus as it WHERE it.PMenuID= 0 order by it.OrderBy desc";

        IList<SystemMenu> list = MenuRepository.FindBy(queryString);
        
        RptMenus.DataSource = list;
        RptMenus.DataBind();
    }
}